package com.gopay.cashier.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.gopay.cashier.dao.CustCorpInfoDAO;
import com.gopay.common.domain.cust.CustCorpInfo;
import com.gopay.common.util.MapUtil;

@Repository("custCorpInfoDao")
public class CustCorpInfoDAOImpl extends CommonDAOImpl<CustCorpInfo, String> implements CustCorpInfoDAO {

    @Override
    public CustCorpInfo getByCustId(String custId) {
        String hql = " from CustCorpInfo t where t.custId = :custId ";
        List<CustCorpInfo> ss = findByHql(hql, MapUtil.get("custId", custId));
        return (null == ss || 0 == ss.size()) ? null : ss.get(0);
    }

}
